package com.yolo.yolorpc.proxy;


import java.lang.reflect.Proxy;

/**
 * @author yolo
 * @Program RPC
 * @description 服务代理工厂(用于创建代理对象)
 * @create 2025-04-22 10:13
 **/
public class ServiceProxyFactory {

    public static <T> T getProxy(Class<T> serviceClass){
        return (T) Proxy.newProxyInstance(
                serviceClass.getClassLoader(),
                new Class[]{serviceClass},
                new ServiceProxy());
    }
}
